indice dun element dans une liste python

28

week = ['monday','tuesday','wednesday']

week.index('tuesday')
>>> 1

"""Warning => error if the element isn't in the list"""

Comments

Submit
0 Comments